package org.neframework.webtest.action.xyk.doit;

import java.util.List;
import java.util.Map;

import org.neframework.webtest.base.BaseController;
import org.neframework.webtest.service.CustomerAnysisService;
import org.neframework.webtest.util.date.DateTools;

import com.tmsps.neframework.mvc.annotation.Controller;
import com.tmsps.neframework.mvc.annotation.RequestMapping;
import com.tmsps.neframework.mvc.annotation.ResponseBody;

@Controller
@RequestMapping("/cp/xyk/doit/flow")
public class FlowController extends BaseController {

	private static final CustomerAnysisService anysisService = new CustomerAnysisService();

	@RequestMapping("/list")
	public String list() {
		String srh_date = DateTools.getYearMonth()+"-01";
		String srh_date2 = DateTools.getToday();

		req.setAttribute("srh_date", srh_date);
		req.setAttribute("srh_date2", srh_date2);
		return "/jsp/xyk/doit/flow/list.jsp";
	}

	@RequestMapping("/list_data")
	@ResponseBody
	public void list_data(String srh_date, String srh_date2,
			String srh_card_no, String srh_address) {

		List<Map<String, Object>> list = anysisService.selectFlowList(srh_date,
				srh_date2, srh_card_no, srh_address, sort_params, page);

		result.put("list", list);
	}

}
